package com.petshop.products.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.petshop.products.mapper.PetProductsMapper;
import com.petshop.products.domain.PetProducts;
import com.petshop.products.service.IPetProductsService;

/**
 * 商品信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-11
 */
@Service
public class PetProductsServiceImpl implements IPetProductsService 
{
    @Autowired
    private PetProductsMapper petProductsMapper;

    /**
     * 查询商品信息
     * 
     * @param productID 商品信息主键
     * @return 商品信息
     */
    @Override
    public PetProducts selectPetProductsByProductID(Long productID)
    {
        return petProductsMapper.selectPetProductsByProductID(productID);
    }

    /**
     * 查询商品信息列表
     * 
     * @param petProducts 商品信息
     * @return 商品信息
     */
    @Override
    public List<PetProducts> selectPetProductsList(PetProducts petProducts)
    {
        return petProductsMapper.selectPetProductsList(petProducts);
    }

    /**
     * 新增商品信息
     * 
     * @param petProducts 商品信息
     * @return 结果
     */
    @Override
    public int insertPetProducts(PetProducts petProducts)
    {
        return petProductsMapper.insertPetProducts(petProducts);
    }

    /**
     * 修改商品信息
     * 
     * @param petProducts 商品信息
     * @return 结果
     */
    @Override
    public int updatePetProducts(PetProducts petProducts)
    {
        return petProductsMapper.updatePetProducts(petProducts);
    }

    /**
     * 批量删除商品信息
     * 
     * @param productIDs 需要删除的商品信息主键
     * @return 结果
     */
    @Override
    public int deletePetProductsByProductIDs(Long[] productIDs)
    {
        return petProductsMapper.deletePetProductsByProductIDs(productIDs);
    }

    /**
     * 删除商品信息信息
     * 
     * @param productID 商品信息主键
     * @return 结果
     */
    @Override
    public int deletePetProductsByProductID(Long productID)
    {
        return petProductsMapper.deletePetProductsByProductID(productID);
    }
}
